#include "line.h"
#include "..\clientinterfaces.h"
line::line(void)
{
}

line::~line(void)
{
}

#define SCREEN_W 1024
#define SCREEN_H  768
void line::set_pos( float x,float y,float x1,float y1 )
{
	m_begin_x=x;
	m_begin_y=y;
	m_end_x=x1;
	m_end_y=y1;
	m_line.verts[0].x=m_begin_x*SCREEN_W;
	m_line.verts[0].y=m_begin_y*SCREEN_H;
	m_line.verts[0].z=SCREEN_NEAR_Z;

	m_line.verts[1].x=m_end_x*SCREEN_W;
	m_line.verts[1].y=m_end_y*SCREEN_H;
	m_line.verts[1].z=SCREEN_NEAR_Z;

}

void line::set_color( uint8 _a,uint8 _r,uint8 _g,uint8 _b )
{
	m_line.rgba.a=_a;
	m_line.rgba.r=_r;
	m_line.rgba.g=_g;
	m_line.rgba.b=_b;
}

void line::render()
{

	g_pLTCDrawPrim->DrawPrim(&m_line);

}